package cn.com.captureNetPacket;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;

import lombok.extern.slf4j.Slf4j;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Slf4j
// 调试时注意放开 ,Component 注解。
@Component
@Order(value=1) //首先执行
public class StartApplication implements ApplicationRunner {
	
 
	@Autowired
	public CaptureNetPacketService captureNetPacketService;
	 
	@Override
	public void run(ApplicationArguments arg0) throws Exception {
//		margeThread.margeStart();
//		test.testaaa();
		log.info("启动抓包 captureNetPacketService startService");
		startService();
	}
	
	
     private void  startService() throws Exception{
		 log.info("captureNetPacketService startService");
    	 captureNetPacketService.startinit();
     }
}
